


<!DOCTYPE html>
<html id="htmlId">
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
  <title>Coverage Report > GoodsTypeServiceImpl</title>
  <style type="text/css">
    @import "../../css/coverage.css";
    @import "../../css/idea.min.css";
  </style>
  <script type="text/javascript" src="../../js/highlight.min.js"></script>
  <script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>

<body>
<div class="content">
<div class="breadCrumbs">
Current scope:     <a href="../../index.html">all classes</a>
    <span class="separator">|</span>
    <a href="../index.html">com.ie.service.admin</a>
</div>

<h1>Coverage Summary for Class: GoodsTypeServiceImpl (com.ie.service.admin)</h1>

<table class="coverageStats">

<tr>
  <th class="name">Class</th>
<th class="coverageStat 
">
  Method, %
</th>
<th class="coverageStat 
">
  Branch, %
</th>
<th class="coverageStat 
">
  Line, %
</th>
</tr>
<tr>
  <td class="name">GoodsTypeServiceImpl</td>
<td class="coverageStat">
  <span class="percent">
    20%
  </span>
  <span class="absValue">
    (1/5)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    0%
  </span>
  <span class="absValue">
    (0/12)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    4.3%
  </span>
  <span class="absValue">
    (1/23)
  </span>
</td>
</tr>
  <tr>
    <td class="name">GoodsTypeServiceImpl$$SpringCGLIB$$0</td>
  </tr>
<tr>
  <td class="name"><strong>Total</strong></td>
<td class="coverageStat">
  <span class="percent">
    20%
  </span>
  <span class="absValue">
    (1/5)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    0%
  </span>
  <span class="absValue">
    (0/12)
  </span>
</td>
<td class="coverageStat">
  <span class="percent">
    4.3%
  </span>
  <span class="absValue">
    (1/23)
  </span>
</td>
</tr>
</table>

<br/>
<br/>


<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package com.ie.service.admin;
&nbsp;
&nbsp;import com.baomidou.mybatisplus.core.metadata.IPage;
&nbsp;import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
&nbsp;import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
&nbsp;import com.ie.common.http.ResponseResult;
&nbsp;import com.ie.entity.admin.GoodsTypeEntity;
&nbsp;import com.ie.mapper.admin.GoodsTypeMapper;
&nbsp;import org.springframework.stereotype.Service;
&nbsp;
&nbsp;import java.util.HashMap;
&nbsp;import java.util.Map;
&nbsp;
&nbsp;@Service
<b class="fc">&nbsp;public class GoodsTypeServiceImpl extends ServiceImpl&lt;GoodsTypeMapper, GoodsTypeEntity&gt; implements GoodsTypeService {</b>
&nbsp;
&nbsp;    @Override
&nbsp;    public ResponseResult&lt;Map&lt;String, Object&gt;&gt; addGoodsType(GoodsTypeEntity goodsTypeEntity) {
<b class="nc">&nbsp;        boolean res = save(goodsTypeEntity);</b>
<b class="nc">&nbsp;        if (res) {</b>
<b class="nc">&nbsp;            return ResponseResult.getMessageResult(null, &quot;A001&quot;);</b>
&nbsp;        }
<b class="nc">&nbsp;        return ResponseResult.getMessageResult(null, &quot;A002&quot;);</b>
&nbsp;    }
&nbsp;
&nbsp;    @Override
&nbsp;    public ResponseResult&lt;Map&lt;String, Object&gt;&gt; updateGoodsType(GoodsTypeEntity goodsTypeEntity) {
<b class="nc">&nbsp;        if (updateById(goodsTypeEntity)) {</b>
<b class="nc">&nbsp;            return ResponseResult.getMessageResult(null, &quot;A001&quot;);</b>
&nbsp;        }
<b class="nc">&nbsp;        return ResponseResult.getMessageResult(null, &quot;A002&quot;);</b>
&nbsp;    }
&nbsp;
&nbsp;    @Override
&nbsp;    public ResponseResult&lt;Map&lt;String, Object&gt;&gt; deleteGoodsType(GoodsTypeEntity goodsTypeEntity) {
<b class="nc">&nbsp;        long res = 0;</b>
<b class="nc">&nbsp;        if (res &gt; 0) {</b>
<b class="nc">&nbsp;            return ResponseResult.getMessageResult(null, &quot;A001&quot;);</b>
&nbsp;        }
<b class="nc">&nbsp;        if (removeById(goodsTypeEntity.getId())) {</b>
<b class="nc">&nbsp;            return ResponseResult.getMessageResult(null, &quot;A002&quot;);</b>
&nbsp;        }
<b class="nc">&nbsp;        return ResponseResult.getMessageResult(null, &quot;A003&quot;);</b>
&nbsp;    }
&nbsp;
&nbsp;    @Override
&nbsp;    public ResponseResult&lt;Map&lt;String, Object&gt;&gt; getGoodsType(GoodsTypeEntity goodsTypeEntity) {
<b class="nc">&nbsp;        Integer currentPage = goodsTypeEntity.getCurrentPage();</b>
<b class="nc">&nbsp;        if (currentPage == null || currentPage &lt; 0) {</b>
<b class="nc">&nbsp;            currentPage = 1;</b>
&nbsp;        }
<b class="nc">&nbsp;        IPage&lt;GoodsTypeEntity&gt; iPage = new Page&lt;&gt;(currentPage, 5);</b>
<b class="nc">&nbsp;        IPage&lt;GoodsTypeEntity&gt; page = this.page(iPage);</b>
<b class="nc">&nbsp;        Map&lt;String, Object&gt; npapresult = new HashMap&lt;&gt;();</b>
<b class="nc">&nbsp;        npapresult.put(&quot;allGoodsTypes&quot;, page.getRecords());</b>
<b class="nc">&nbsp;        npapresult.put(&quot;totalPage&quot;, page.getPages());</b>
<b class="nc">&nbsp;        return ResponseResult.getSuccessResult(npapresult);</b>
&nbsp;    }
&nbsp;}
&nbsp;
&nbsp;
&nbsp;
</code>
</pre>
</div>

<script type="text/javascript">
(function() {
    var msie = false, msie9 = false;
    /*@cc_on
      msie = true;
      @if (@_jscript_version >= 9)
        msie9 = true;
      @end
    @*/

    if (!msie || msie && msie9) {
      hljs.highlightAll()
      hljs.initLineNumbersOnLoad();
    }
})();
</script>

<div class="footer">
    
    <div style="float:right;">generated on 2025-06-15 18:23</div>
</div>
</body>
</html>
